<?php
require_once('cps360.class.php');
require_once('func.php');

$post = $_POST;

//有效期验证
$ok = checkActiveTime($post['active_time'], $msg);
if (!$ok) {
    processError($msg);
    exit();
}

// 签名验证
$ok = checkSign($post, $msg);
if (!$ok) {
    processError($msg);
    exit();
}

$start = 0;
$size = 10000;

$cps360_order_mng = new Cps360Order();
$list = $cps360_order_mng->getQueryList($post, $start, $size);

// xml数据字段
$fields = array(
    'bid',
    'qid',
    'qihoo_id',
    'order_id',
    'order_time',
    'order_updtime',
    'server_price',
    'order_price',
    'coupon',
    'total_price',
    'total_comm',
    'commission',
    'p_info',
    'ext',
    'status'
);
$xml = getXml($fields, $list);

Header("Content-type: text/xml; charset=utf-8");
echo $xml;

?>
